<?php
/**
 * Created by PhpStorm.
 * User: zhu_hbo
 * Date: 16/10/9
 * Time: 下午4:20
 */

class classname
{
    function __construct()
    {
        echo __METHOD__,"ns6 \n";
    }
}
function funcname()
{
    echo __FUNCTION__," ns6 \n";
}
const constname = "ns6 global";

$a = 'classname';
$obj = new $a; // prints classname::__construct
echo "<p>";
$b = 'funcname';
$b(); // prints funcname
echo "<p>";
echo constant('constname'), "\n"; // prints global
echo "<p>";

?>